﻿<%@ Page Language="C#" MasterPageFile="~/PresentationLayer/Split.Master" AutoEventWireup="true" CodeBehind="AreaPessoalTest.aspx.cs" Inherits="Distrackting.PresentationLayer.AreaPessoalTest" Title="Distrackting: Área Pessoal - Teste" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="side" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rest" runat="server">
<div class="large box border">
    <asp:Label ID="Label5" runat="server" Font-Bold="True" 
        Text="Os Meus Testemunhos"></asp:Label>
    <br />
    &nbsp;<asp:DetailsView ID="DetailsView_Testemunhos" runat="server" Height="68px" 
        Width="421px" AllowPaging="True" AutoGenerateRows="False" 
        DataSourceID="MeusTestemunhosDataSource" CellPadding="4" 
        ForeColor="#333333" GridLines="None">
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True" />
        <RowStyle BackColor="#E3EAEB" />
        <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        
        <Fields>
            <asp:TemplateField HeaderText="Utilizador" SortExpression="cod_utilizador">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Utilizador.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("cod_utilizador") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("cod_utilizador") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Data" SortExpression="data_realizado">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("data_realizado") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("data_realizado") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("data_realizado") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Descrição" SortExpression="texto">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("texto") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("texto") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("texto") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Rating" SortExpression="rating">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("rating") %>'></asp:Label>
                    <asp:Image ID="Image1" runat="server" 
                        DescriptionUrl="~/PresentationLayer/Images/rate_star_25x23.png" 
                        ImageUrl="~/PresentationLayer/Images/rate_star_25x23.png" Width="16px" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("rating") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("rating") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Percurso" SortExpression="cod_percurso">
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("Percurso.nome") %>'></asp:Label>
                    &nbsp;
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("cod_percurso") %>'></asp:TextBox>
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("cod_percurso") %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
        </Fields>
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#7C6F57" />
        <AlternatingRowStyle BackColor="White" />
    </asp:DetailsView>
    <asp:ObjectDataSource ID="MeusTestemunhosDataSource" runat="server" 
        SelectMethod="getTestemunhosByUtilizador" 
        TypeName="Distrackting.BusinessLayer.GerirPercursos">
        <SelectParameters>
            <asp:SessionParameter Name="cod_user" SessionField="user_guid" Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
</div>
</asp:Content>
